Resume the parent when the fleet goes dry with open tasks - #852
Conversation
TheGreatAxios
left a comment
There was a problem hiding this comment.
CL-7540 happy path holds at 83a6c65b. Dry fleet + open tasks fires one occupancy shot; a missed wentDry while processing latches and drives from settle; stale connector.reply is held until continuation inference.start; mailbox reports are taken only after TUI send succeeds; idle-with-live-fleet stays.
Two should-fix items:
- Occupancy send failure: latch is consumed and
awaitingContinuationInferenceis set, then TUI send returns false andhandleSendFailureidles withoutsettleRunToIdle, so there is no second shot, replies stay skipped, and queued follow-ups are undrained (src/tui/runtime-bridge.ts/src/subagent/fleet-dry-drive.ts/src/tui/runner/submit.ts). - Occupancy send never writes
lastSentMessage, so a continuation 429 quota-retries the previous operator prompt (beginSystemContinuationvs the operator send path).
Happy-path tests to keep. Please add send-failure re-arm and occupancy quota-replay cases.
Merge note: overlaps PR 841 on runtime-bridge / wiring / submit and PR 853 on agent-fleet.
TheGreatAxios
left a comment
There was a problem hiding this comment.
Verdict: comment.
CL-7540 happy path holds at 83a6c65b. Dry fleet + open tasks fires one occupancy shot; a missed wentDry while processing latches and drives from settle; stale connector.reply is held until continuation inference.start; mailbox reports are taken only after TUI send succeeds; idle-with-live-fleet stays.
Two should-fix items:
- Occupancy send failure: latch is consumed and
awaitingContinuationInferenceis set, then TUI send returns false andhandleSendFailureidles withoutsettleRunToIdle, so there is no second shot, replies stay skipped, and queued follow-ups are undrained (src/tui/runtime-bridge.ts/src/subagent/fleet-dry-drive.ts/src/tui/runner/submit.ts). - Occupancy send never writes
lastSentMessage, so a continuation 429 quota-retries the previous operator prompt (beginSystemContinuationvs the operator send path).
Happy-path tests to keep. Please add send-failure re-arm and occupancy quota-replay cases.
Merge note: overlaps PR 841 on runtime-bridge / wiring / submit and PR 853 on agent-fleet.
bb203f8 to
e81662a
Compare
14a6a10 to
4f142f1
Compare
4f142f1 to
2fc35f9
Compare
2fc35f9 to
fae6b49
Compare
fae6b49 to
6227841
Compare
6227841 to
3e43573
Compare
A session with todo/doing tasks was settling idle just because the fleet printed nothing running. Re-enter with collected reports on the wentDry edge. Idle-with-live-fleet stays.
A last-lane terminal while the parent is still processing dropped the wentDry edge, then settle idled with open tasks. Occupancy now latches that edge and drives once from settle. Send failure no longer consumes mailbox reports.
The occupancy shot re-arms processing during inference.done, so the same turn's connector.reply settled idle and drained queued follow-ups. Hold until the continuation's inference.start. Take mailbox reports only after send actually succeeds on the TUI path.
A failed occupancy send consumed the dry-open latch and left the turn running. Abort now re-arms, drains, and resets cadence so a later settle can retry; a successful occupancy stamps lastSentMessage so quota retry resends the continuation.
beginSystemContinuation queues the occupancy string on pendingEchoes. Abort without a matching message.received left that echo in place, so a later inbound with the same text could be swallowed. Pop that continuation echo on abort without wiping unrelated operator echoes.
The occupancy collector is the wait_agents JSON shape. Dropping stopReason there made interrupt and incomplete-report waits look clean after collection.
3e43573 to
459fff4
Compare
Summary
Verification
Fixes CL-7540